package day06;
public class TeacherTest {

    public static void main(String[] args) {
      // 创建Teacher对象
      Teacher t = new Teacher();
      // 调用set方法赋值
      t.setName("张三");
      t.setAge(30);
      t.setSubject("Java");
      // 调用show方法输出属性
      t.show();
      // 通过全参构造器创建对象
      Teacher t1 = new Teacher("李四", 35, "Python");
      t1.show();
      // 通过单参构造器创建对象
      Teacher t2 = new Teacher("李四");
      t2.show();
    }
  }